package com.iwhalecloud.uncc.domain.exception;

public class CollectException extends Exception {

    /**
     *
     */
    private static final long serialVersionUID = -3611741633800256140L;
    private String errorKey;

    public CollectException() {
        super();
    }

    public CollectException(String errorKey, Throwable cause) {
        super(cause);
        this.errorKey = errorKey;
    }

    public CollectException(Throwable cause) {
        super(cause);
        this.errorKey = "error.system";
    }

    public CollectException(String errorKey) {
        this.errorKey = errorKey;
    }

    public CollectException(String errorKey, String message) {
        super(message);
        this.errorKey = errorKey;
    }

    @Override
    public String toString() {
        return errorKey;
    }

    public String getErrorKey() {
        return errorKey;
    }

}
